using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ImageAnalystTools._Extraction
{
    /// <summary>
    /// <para>Sample</para>
    /// <para>Creates a table or a point feature class that shows the values of cells from a raster, or a set of rasters, for defined locations. The locations are defined by raster cells, points, polylines, or polygons.</para>
    /// <para>创建一个表或点要素类，用于显示已定义位置的栅格或一组栅格中的像元值。位置由栅格像元、点、折线或面定义。</para>
    /// </summary>    
    [DisplayName("Sample")]
    public class Sample : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public Sample()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_rasters">
        /// <para>Input rasters</para>
        /// <para><xdoc>
        ///   <para>The rasters with values that will be sampled based on the input location data.</para>
        ///   <para>The Process as multidimensional parameter is only available when the input is a single, multidimensional raster.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将根据输入位置数据进行采样的值的栅格。</para>
        ///   <para>仅当输入为单个多维栅格时，作为多维的流程参数才可用。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_in_location_data">
        /// <para>Input location raster or features</para>
        /// <para><xdoc>
        ///   <para>The data identifying positions where a sample will be taken.</para>
        ///   <para>The input can be a raster or a feature class.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>标识取样位置的数据。</para>
        ///   <para>输入可以是栅格或要素类。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_table">
        /// <para>Output table or feature class</para>
        /// <para><xdoc>
        ///   <para>The output table or feature class containing the sampled cell values.</para>
        ///   <para>The output format is determined by the output location and path. By default, the output will be a geodatabase table or a geodatabase feature class in a geodatabase workspace or a dBASE table or a shapefile feature class in a folder workspace.</para>
        ///   <para>The output data type to generate a table or a feature class is controlled by the Generate feature class parameter.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>包含采样像元值的输出表或要素类。</para>
        ///   <para>输出格式由输出位置和路径决定。默认情况下，输出将是地理数据库工作空间中的地理数据库表或地理数据库要素类，或者文件夹工作空间中的 dBASE 表或 shapefile 要素类。</para>
        ///   <para>用于生成表或要素类的输出数据类型由生成要素类参数控制。</para>
        /// </xdoc></para>
        /// </param>
        public Sample(List<object> _in_rasters, object _in_location_data, object _out_table)
        {
            this._in_rasters = _in_rasters;
            this._in_location_data = _in_location_data;
            this._out_table = _out_table;
        }
        public override string ToolboxName => "Image Analyst Tools";

        public override string ToolName => "Sample";

        public override string CallName => "ia.Sample";

        public override List<string> AcceptEnvironments => ["autoCommit", "configKeyword", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "parallelProcessingFactor", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_rasters, _in_location_data, _out_table, _resampling_type.GetGPValue(), _unique_id_field, _process_as_multidimensional.GetGPValue(), _acquisition_definition, _statistics_type.GetGPValue(), _percentile_value, _buffer_distance, _layout.GetGPValue(), _generate_feature_class.GetGPValue()];

        /// <summary>
        /// <para>Input rasters</para>
        /// <para><xdoc>
        ///   <para>The rasters with values that will be sampled based on the input location data.</para>
        ///   <para>The Process as multidimensional parameter is only available when the input is a single, multidimensional raster.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将根据输入位置数据进行采样的值的栅格。</para>
        ///   <para>仅当输入为单个多维栅格时，作为多维的流程参数才可用。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input rasters")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _in_rasters { get; set; }


        /// <summary>
        /// <para>Input location raster or features</para>
        /// <para><xdoc>
        ///   <para>The data identifying positions where a sample will be taken.</para>
        ///   <para>The input can be a raster or a feature class.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>标识取样位置的数据。</para>
        ///   <para>输入可以是栅格或要素类。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input location raster or features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_location_data { get; set; }


        /// <summary>
        /// <para>Output table or feature class</para>
        /// <para><xdoc>
        ///   <para>The output table or feature class containing the sampled cell values.</para>
        ///   <para>The output format is determined by the output location and path. By default, the output will be a geodatabase table or a geodatabase feature class in a geodatabase workspace or a dBASE table or a shapefile feature class in a folder workspace.</para>
        ///   <para>The output data type to generate a table or a feature class is controlled by the Generate feature class parameter.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>包含采样像元值的输出表或要素类。</para>
        ///   <para>输出格式由输出位置和路径决定。默认情况下，输出将是地理数据库工作空间中的地理数据库表或地理数据库要素类，或者文件夹工作空间中的 dBASE 表或 shapefile 要素类。</para>
        ///   <para>用于生成表或要素类的输出数据类型由生成要素类参数控制。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output table or feature class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_table { get; set; }


        /// <summary>
        /// <para>Resampling technique</para>
        /// <para><xdoc>
        ///   <para>The resampling algorithm that will be used to sample a raster to determine how the values will be obtained from the raster.</para>
        ///   <bulletList>
        ///     <bullet_item>Nearest—Nearest neighbor assignment will be used. This is the default.</bullet_item><para/>
        ///     <bullet_item>Bilinear—Bilinear interpolation will be used.</bullet_item><para/>
        ///     <bullet_item>Cubic—Cubic convolution will be used.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将用于对栅格进行采样以确定如何从栅格获取值的重采样算法。</para>
        ///   <bulletList>
        ///     <bullet_item>最近—将使用最近邻分配。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>双线性—将使用双线性插值。</bullet_item><para/>
        ///     <bullet_item>立方—将使用三次卷积。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Resampling technique")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _resampling_type_value _resampling_type { get; set; } = _resampling_type_value._NEAREST;

        public enum _resampling_type_value
        {
            /// <summary>
            /// <para>Nearest</para>
            /// <para>Nearest—Nearest neighbor assignment will be used. This is the default.</para>
            /// <para>最近—将使用最近邻分配。这是默认设置。</para>
            /// </summary>
            [Description("Nearest")]
            [GPEnumValue("NEAREST")]
            _NEAREST,

            /// <summary>
            /// <para>Bilinear</para>
            /// <para>Bilinear—Bilinear interpolation will be used.</para>
            /// <para>双线性—将使用双线性插值。</para>
            /// </summary>
            [Description("Bilinear")]
            [GPEnumValue("BILINEAR")]
            _BILINEAR,

            /// <summary>
            /// <para>Cubic</para>
            /// <para>Cubic—Cubic convolution will be used.</para>
            /// <para>立方—将使用三次卷积。</para>
            /// </summary>
            [Description("Cubic")]
            [GPEnumValue("CUBIC")]
            _CUBIC,

        }

        /// <summary>
        /// <para>Unique ID field</para>
        /// <para>A field containing a different value for every location or feature in the input location raster or features.</para>
        /// <para>对于输入位置栅格或要素中的每个位置或要素，包含不同值的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Unique ID field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _unique_id_field { get; set; } = null;


        /// <summary>
        /// <para>Process as multidimensional</para>
        /// <para><xdoc>
        ///   <para>Specifies how the input rasters will be processed.</para>
        ///   <para>This parameter is only available when the input is a single, multidimensional raster.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Samples will be processed from the current slice of a multidimensional dataset. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Samples will be processed for all dimensions (such as time or depth) of a multidimensional dataset.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定输入栅格的处理方式。</para>
        ///   <para>仅当输入为单个多维栅格时，此参数才可用。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 将从多维数据集的当前剖面处理样本。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中—将针对多维数据集的所有维度（例如时间或深度）处理样本。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Process as multidimensional")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _process_as_multidimensional_value _process_as_multidimensional { get; set; } = _process_as_multidimensional_value._false;

        public enum _process_as_multidimensional_value
        {
            /// <summary>
            /// <para>CURRENT_SLICE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CURRENT_SLICE")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>ALL_SLICES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ALL_SLICES")]
            [GPEnumValue("true")]
            _true,

        }

        /// <summary>
        /// <para>Acquisition information of location data</para>
        /// <para><xdoc>
        ///   <para>Specifies the time, depth, or other acquisition data associated with the location features.</para>
        ///   <para>Only the following combinations are supported:
        ///   <bulletList>
        ///     <bullet_item>Dimension + Start field or value  </bullet_item><para/>
        ///     <bullet_item>Dimension + Start field or value + End field or value  </bullet_item><para/>
        ///     <bullet_item>Dimension + Start field or value + Relative value or days before + Relative value or days after  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        ///   <para>Relative value or days before and Relative value or days after only support nonnegative values.</para>
        ///   <para>Statistics will be calculated using the Statistics type parameter for variables within this dimension range.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定与位置要素关联的时间、深度或其他采集数据。</para>
        /// <para>仅支持以下组合：
        ///   <bulletList>
        ///     <bullet_item>维度 + 起始字段或值</bullet_item><para/>
        ///     <bullet_item>维度 + 起始字段或值 + 结束字段或值</bullet_item><para/>
        ///     <bullet_item>维度 + 起始字段或值 + 相对值或之前的天数 + 相对值或之后的天数</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        ///   <para>“相对值”或“前天”和“相对值或后天”仅支持非负值。</para>
        ///   <para>将使用此维度范围内变量的统计信息类型参数计算统计数据。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Acquisition information of location data")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _acquisition_definition { get; set; } = null;


        /// <summary>
        /// <para>Statistics type</para>
        /// <para><xdoc>
        ///   <para>Specifies the statistic type to be calculated.</para>
        ///   <bulletList>
        ///     <bullet_item>Minimum—The minimum value within the specified range will be calculated.</bullet_item><para/>
        ///     <bullet_item>Maximum—The maximum value within the specified range will be calculated.</bullet_item><para/>
        ///     <bullet_item>Median—The median value within the specified range will be calculated.</bullet_item><para/>
        ///     <bullet_item>Mean—The average for the specified range will be calculated.</bullet_item><para/>
        ///     <bullet_item>Sum—The total value of the variables within the specified range will be calculated.</bullet_item><para/>
        ///     <bullet_item>Majority—The value that occurs most frequently will be calculated.</bullet_item><para/>
        ///     <bullet_item>Minority—The value that occurs least frequently will be calculated.</bullet_item><para/>
        ///     <bullet_item>Standard deviation—The standard deviation will be calculated.</bullet_item><para/>
        ///     <bullet_item>Percentile—A defined percentile within the specified range will be calculated.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要计算的统计信息类型。</para>
        ///   <bulletList>
        ///     <bullet_item>最小值—将计算指定范围内的最小值。</bullet_item><para/>
        ///     <bullet_item>最大值—将计算指定范围内的最大值。</bullet_item><para/>
        ///     <bullet_item>中位数—将计算指定范围内的中值。</bullet_item><para/>
        ///     <bullet_item>均值—将计算指定范围的平均值。</bullet_item><para/>
        ///     <bullet_item>Sum—将计算指定范围内变量的总值。</bullet_item><para/>
        ///     <bullet_item>多数 - 将计算出现频率最高的值。</bullet_item><para/>
        ///     <bullet_item>少数 - 将计算出现频率最低的值。</bullet_item><para/>
        ///     <bullet_item>标准差—将计算标准差。</bullet_item><para/>
        ///     <bullet_item>百分位数—将计算指定范围内定义的百分位数。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Statistics type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _statistics_type_value? _statistics_type { get; set; } = null;

        public enum _statistics_type_value
        {
            /// <summary>
            /// <para>Minimum</para>
            /// <para>Minimum—The minimum value within the specified range will be calculated.</para>
            /// <para>最小值—将计算指定范围内的最小值。</para>
            /// </summary>
            [Description("Minimum")]
            [GPEnumValue("MINIMUM")]
            _MINIMUM,

            /// <summary>
            /// <para>Maximum</para>
            /// <para>Maximum—The maximum value within the specified range will be calculated.</para>
            /// <para>最大值—将计算指定范围内的最大值。</para>
            /// </summary>
            [Description("Maximum")]
            [GPEnumValue("MAXIMUM")]
            _MAXIMUM,

            /// <summary>
            /// <para>Median</para>
            /// <para>Median—The median value within the specified range will be calculated.</para>
            /// <para>中位数—将计算指定范围内的中值。</para>
            /// </summary>
            [Description("Median")]
            [GPEnumValue("MEDIAN")]
            _MEDIAN,

            /// <summary>
            /// <para>Mean</para>
            /// <para>Mean—The average for the specified range will be calculated.</para>
            /// <para>均值—将计算指定范围的平均值。</para>
            /// </summary>
            [Description("Mean")]
            [GPEnumValue("MEAN")]
            _MEAN,

            /// <summary>
            /// <para>Sum</para>
            /// <para>Sum—The total value of the variables within the specified range will be calculated.</para>
            /// <para>Sum—将计算指定范围内变量的总值。</para>
            /// </summary>
            [Description("Sum")]
            [GPEnumValue("SUM")]
            _SUM,

            /// <summary>
            /// <para>Majority</para>
            /// <para>Majority—The value that occurs most frequently will be calculated.</para>
            /// <para>多数 - 将计算出现频率最高的值。</para>
            /// </summary>
            [Description("Majority")]
            [GPEnumValue("MAJORITY")]
            _MAJORITY,

            /// <summary>
            /// <para>Minority</para>
            /// <para>Minority—The value that occurs least frequently will be calculated.</para>
            /// <para>少数 - 将计算出现频率最低的值。</para>
            /// </summary>
            [Description("Minority")]
            [GPEnumValue("MINORITY")]
            _MINORITY,

            /// <summary>
            /// <para>Standard deviation</para>
            /// <para>Standard deviation—The standard deviation will be calculated.</para>
            /// <para>标准差—将计算标准差。</para>
            /// </summary>
            [Description("Standard deviation")]
            [GPEnumValue("STD")]
            _STD,

            /// <summary>
            /// <para>Percentile</para>
            /// <para>Percentile—A defined percentile within the specified range will be calculated.</para>
            /// <para>百分位数—将计算指定范围内定义的百分位数。</para>
            /// </summary>
            [Description("Percentile")]
            [GPEnumValue("PERCENTILE")]
            _PERCENTILE,

        }

        /// <summary>
        /// <para>Percentile value</para>
        /// <para>This value can range from 0 to 100. The default is 90.</para>
        /// <para>此值的范围可以从 0 到 100。默认值为 90。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Percentile value")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _percentile_value { get; set; } = null;


        /// <summary>
        /// <para>Buffer distance field or value</para>
        /// <para><xdoc>
        ///   <para>The distance around the location data features. The buffer distance is specified in the linear unit of the location feature's spatial reference. If the feature uses a geographic reference, the unit will be degrees.</para>
        ///   <para>Statistics will be calculated within this buffer area.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>位置数据要素周围的距离。缓冲距离以位置要素空间参考的线性单位指定。如果要素使用地理参考，则单位将为度。</para>
        ///   <para>统计数据将在此缓冲区内计算。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Buffer distance field or value")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _buffer_distance { get; set; } = null;


        /// <summary>
        /// <para>Column-wise layout</para>
        /// <para><xdoc>
        ///   <para>Specifies whether sampled values will appear in rows or columns in the output table.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Sampled values will appear in separate rows in the output table. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Sampled values will appear in separate columns in the output table. This option is only valid when the input multidimensional raster contains one variable and one dimension, and each slice is a single-band raster.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定采样值是显示在输出表的行还是列中。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 采样值将显示在输出表中的单独行中。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 采样值将显示在输出表的单独列中。仅当输入多维栅格包含一个变量和一个维度，并且每个切片都是单波段栅格时，此选项才有效。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Column-wise layout")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _layout_value _layout { get; set; } = _layout_value._false;

        public enum _layout_value
        {
            /// <summary>
            /// <para>ROW_WISE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ROW_WISE")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>COLUMN_WISE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("COLUMN_WISE")]
            [GPEnumValue("true")]
            _true,

        }

        /// <summary>
        /// <para>Generate feature class</para>
        /// <para><xdoc>
        ///   <para>Specifies whether a point feature class with sampled values in its attribute table or a table with sampled values will be generated.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—A table with sampled values will be generated. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—A point feature class with sampled values in its attribute table will be generated.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是生成在其属性表中具有采样值的点要素类，还是生成具有采样值的表。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 将生成具有采样值的表。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中—将生成在其属性表中具有采样值的点要素类。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Generate feature class")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _generate_feature_class_value _generate_feature_class { get; set; } = _generate_feature_class_value._false;

        public enum _generate_feature_class_value
        {
            /// <summary>
            /// <para>TABLE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("TABLE")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>FEATURE_CLASS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("FEATURE_CLASS")]
            [GPEnumValue("true")]
            _true,

        }

        public Sample SetEnv(int? autoCommit = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object parallelProcessingFactor = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, parallelProcessingFactor: parallelProcessingFactor, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}